class ViewModelBasal<T> {
  final T data;

  ViewModelBasal(this.data);
}

TViewModel objectTo<TData, TViewModel extends ViewModelBasal>(TData data, TViewModel Function(TData data) converter) {
  return converter(data);
}

List<TViewModel> arraysTo<TData, TViewModel extends ViewModelBasal>(List<TData> data, TViewModel Function(TData data) converter) {
  return data.map((e) => converter(e)).toList(growable: false);
}